﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SelfManagement.Data.Constant
{
    /// <summary>
    /// 全站会用到的正则表达式集合
    /// </summary>
    public static class ValidationConstant
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public const string UserNameValReg = @"^[a-zA-z0-9][\.\@a-zA-Z0-9_]{1,100}$";
        public const string UserNameValMessage = "用户名错误，请输入英文或数字，不区分大小写";

        /// <summary>
        ///  密码
        /// </summary>
        public const string PasswordValReg = @"^[\@A-Za-z0-9\!\#\$\%\^\&\*\.\~]{6,16}$";
        public const string PasswordValMessage = @"请输入6-16位数字、字母或常用符号，区分大小写";


        /// <summary>
        ///  手机
        /// </summary>
        public const string PhoneValReg = @"^(13[0-9]|14[0-9]|15[0-9]|18[0-9])\d{8}$";
        public const string PhoneValMessage = @"请输入正确的手机号码";

        /// <summary>
        /// 邮箱
        /// </summary>
        public const string EmailValReg = @"^[\w-\._\+%]+@(?:[\w-]+\.)+[\w]{2,6}$";
        public const string EmailValMessage = @"邮箱地址格式错误，请核对后再试";

        /// <summary>
        ///  姓名
        /// </summary>
        public const string TrueNameValReg = @"^([a-z\u4e00-\u9fa5]{2,5}|[a-zA-Z\s]{2,50})$";
        public const string TrueNameValMessage = @"请正确输入您的姓名";

        ///// <summary>
        /////  职位
        ///// </summary>
        //public const string PositionValReg = @"^[\w]{2,20}$";
        //public const string PositionValMessage = @"请正确输入您的职位";
    }

}
